import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service

const request = {
    //新增总计划基本信息
    AddformData (params) {
        return httpPost({
            url: '/material/masterPlan/create',
            params
        })
    },
    // 总计划分页查询
    planListByEntity (params) {
        return httpPost({
            url: '/material/masterPlan/listByEntity',
            params
        })
    },
    //根据物资类别父级id获取子级物资类别集合
    materialCategoryLibraryQueryListByParentClassId (n1, n2, n3) {
        return httpGet({
            url: '/material/categoryLibrary/queryListByParentClassId',
            params: {
                id: n1,
                materialType: n2,
                estimatedMaterialLock: n3
            }
        })
    },

    //根据实体属性分页查询物资基础库
    getBaseLibraryListByEntity (params) {
        return httpPost({
            url: '/material/baseLibrary/listByEntity',
            params
        })
    },
    //获取物资理论计划中的物资数据
    getProjectPlan (params) {
        return httpPost({
            url: '/project/mtp/getMaterialPlanDtl',
            params
        })
    },
    //根据总计划id获取总计划明细信息
    totalGetListById (params) {
        return httpGet({
            url: '/material/masterPlan/getListById',
            params
        })
    },
    //总计划新增明细数据
    createMasterPlan (params) {
        return httpPost({
            url: '/material/masterPlan/createLsit',
            params
        })
    },
    //总计划变更新增明细数据
    createMasterPlanChange (params) {
        return httpPost({
            url: '/material/masterPlan/createLsit',
            params
        })
    },

    //总计划变更修改基本数据
    updatebasicDataPlanChange (params) {
        return httpPost({
            url: '/material/masterPlanChanged/update',
            params
        })
    },
    //总计划修改明细数据
    updateMasterPlan (params) {
        return httpPost({
            url: '/material/masterPlan/updateList',
            params
        })
    },
    //总计划新增变更基本信息
    totalPlanChangeAdd (params) {
        return httpPost({
            url: '/material/masterPlanChanged/create',
            params
        })
    },

    //修改物资明细信息
    saveMaterialList (params) {
        return httpPost({
            url: '/material/centralizedPurchaseSummary/updateMaterialList',
            params
        })
    },

    //总计划变更修改明细数据
    updateMasterPlanChange (params) {
        return httpPost({
            url: '/material/masterPlanChanged/updateList',
            params
        })
    },
    //修改总计划明细信息
    updateMasterPlanData (params) {
        return httpPost({
            url: '/material/masterPlan/updateList',
            params
        })
    },

    //总计划修改基本数据
    updatebasicDataPlan (params) {
        return httpPost({
            url: '/material/masterPlan/update',
            params
        })
    },
    //审核提交
    AuditCommit (params) {
        return httpPost({
            url: '/material/flowEngin/commit',
            params
        })
    },

    //撤回审核
    undoAudit (params) {
        return httpPost({
            url: '/material/flowEngin/undoAudit',
            params
        })
    },
    //获取当前节点信息
    getCurrentUnitInfo (params) {
        return httpPost({
            url: '/material/flowEngin/getCurrentUnitInfo',
            params
        })
    },
    //审核
    audit (params) {
        return httpPost({
            url: '/material/flowEngin/audit',
            params
        })
    },
    //作废
    nullify (params) {
        return httpPost({
            url: '/material/common/nullify',
            params
        })
    },
    //获取审核历史
    getAuditHistory (params) {
        return httpPost({
            url: '/material/flowEngin/getAuditHistory',
            params
        })
    },
    //汇总物资信息（总计划已汇总物资显示）
    getData (params) {
        return httpPost({
            url: '/material/centralizedPurchaseSummary/listSummaryMaterialInfo',
            params
        })
    },

}

export default request